import 'dart:convert';

/// id : "f8258e9c30ea43b59f80659f388600b9"
/// roomName : "谢瑶的聊天室"
/// isDeleted : false
/// createTime : "2023-06-03T16:05:27"
/// createName : "9OrHH2"
/// passwd : "***"

GroupBean2 groupBean2FromJson(String str) =>
    GroupBean2.fromJson(json.decode(str));

String groupBean2ToJson(GroupBean2 data) => json.encode(data.toJson());

class GroupBean2 {
  GroupBean2({
    String? id,
    String? roomName,
    bool? isDeleted,
    String? createTime,
    String? createName,
    String? passwd,
  }) {
    _id = id;
    _roomName = roomName;
    _isDeleted = isDeleted;
    _createTime = createTime;
    _createName = createName;
    _passwd = passwd;
  }

  GroupBean2.fromJson(dynamic json) {
    _id = json['id'];
    _roomName = json['roomName'];
    _isDeleted = json['isDeleted'];
    _createTime = json['createTime'];
    _createName = json['createName'];
    _passwd = json['passwd'];
  }

  String? _id;
  String? _roomName;
  bool? _isDeleted;
  String? _createTime;
  String? _createName;
  String? _passwd;

  GroupBean2 copyWith({
    String? id,
    String? roomName,
    bool? isDeleted,
    String? createTime,
    String? createName,
    String? passwd,
  }) =>
      GroupBean2(
        id: id ?? _id,
        roomName: roomName ?? _roomName,
        isDeleted: isDeleted ?? _isDeleted,
        createTime: createTime ?? _createTime,
        createName: createName ?? _createName,
        passwd: passwd ?? _passwd,
      );

  String? get id => _id;

  String? get roomName => _roomName;

  bool? get isDeleted => _isDeleted;

  String? get createTime => _createTime;

  String? get createName => _createName;

  String? get passwd => _passwd;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['roomName'] = _roomName;
    map['isDeleted'] = _isDeleted;
    map['createTime'] = _createTime;
    map['createName'] = _createName;
    map['passwd'] = _passwd;
    return map;
  }
}
